Repository navigation
fix(tui): clear answer editing state when selecting other options - #44240
aniruddhaadak80 wants to merge 2 commits into
Conversation
Correct root-cause analysis: mouse paths call Details:
|
ca4afc5 to
1d70070
Compare
|
Thanks for the review - addressed in 1d7007028e:
|
Review follow-up for anomalyco#44240: selectTab previously reset editing state even when the clicked tab was already active, so re-clicking the current tab header closed a custom-answer editor mid-typing. Navigation keybindings are disabled while editing, so mouse clicks were the only path that could hit this. Same-tab selection is now a no-op. Also documents the ordering invariant in selectOption: the custom-answer branch opens the editor and must return before any unconditional editing reset.
1d70070 to
f573c2b
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #44192
Type of change
What does this PR do?
Mouse handlers call
selectOption()/selectTab()directly and bypass theenabled: !store.editinggate on the keybindings. So after selecting "Type your own answer" (editing mode), clicking a preset option (or another question tab) picks it but leavesstore.editingstuck ontrue. At the confirm tab both binding sets then refuse Return - the editing set requires!confirm()and the normal set requires!store.editing- so the answers can never be submitted.This clears
editingwhen a preset option is picked or the tab changes. Selecting the custom row still enters edit mode as before; keyboard-only flows are unchanged since those keys are already gated off while editing.How did you verify your code works?
bun run typecheckclean inpackages/tui; existing tui test suite shows no new failures.Screenshots / recordings
Not a visual UI change.
Checklist